package com.zjq.designpatterns.behaviors.strategy.code;/*
 * 版权信息: 北京千⾥马网信科技有限公司</br>
 * Copyright ©2008-2018. All rights reserved. 京ICP备16007318号
 */

/**
 * 促销活动的类
 *
 * @author jessie
 * @version 1.0
 * @date 2021/1/25
 */
public class PromotionActitity {
    private PromotionStrategy promotionStrategy;
    //通过构造器注入
    public PromotionActitity(PromotionStrategy promotionStrategy) {
        this.promotionStrategy = promotionStrategy;
    }

    //促销行为
    public void executePromotionStrategy(){
        promotionStrategy.doPromotion();
    }
}
